/*
 * Author  : Pallab
 * Program : 1018
 *
 * 2012-03-10 22:32:18
 * I have not failed, I have just found 10000 ways that won't work.
 *
 */
#include <iostream>
#include <algorithm>
#include <vector>
#include <sstream>
#include <fstream>
#include <string>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <functional>
#include <bitset>
#include <iomanip>

#include <ctime>
#include <cassert>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <climits>
#include <cstring>
#include <cstdlib>

using namespace std;


#define foR(i1,st,ed) for(int i1 = st , j1 = ed ; i1 < j1 ; ++i1 )
#define fo(i1,ed) foR( i1 , 0 , ed )
#define foE(i1,st,ed) foR( i1, st, ed+1 )
#define foit(i, x) for (typeof((x).begin()) i = (x).begin(); i != (x).end(); i++)
#define bip system("pause")
#define Int long long
#define pb push_back
#define SZ(X) (int)(X).size()
#define LN(X) (int)(X).length()
#define mk make_pair
#define SET( ARRAY , VALUE ) memset( ARRAY , VALUE , sizeof(ARRAY) )
#define line puts("")
inline int OR(int msk,int bit) {
    return ( msk|(1<<bit) );
}
inline int AND(int msk, int bit) {
    return ( msk&(1<<bit) );
}
inline int XOR(int msk, int bit) {
    return ( msk&(~(1<<bit)));
}
inline bool marked(int msk, int bit) {
    return ( AND(msk,bit)!=0 );
}
template<class T>
inline void debug(T _x) {
    cout<<_x<<'\n';
}
template<class T1, class T2>
inline void debug(T1 _x,T2 _y) {
    cout<<_x<<' '<<_y<<'\n';
}
template<class T1, class T2, class T3>
inline void debug(T1 _x,T2 _y,T3 _z) {
    cout<<_x<<' '<<_y<<' '<<_z<<'\n';
}
template<class T1, class T2, class T3, class T4>
inline void debug(T1 _x,T2 _y,T3 _z,T4 _zz) {
    cout<<_x<<' '<<_y<<' '<<_z<<' '<<_zz<<'\n';
}
inline bool CI(int &_x) {
    return scanf("%d",&_x)==1;
}
inline bool CI(int &_x, int &_y) {
    return CI(_x)&&CI(_y) ;
}
inline bool CI(int &_x, int &_y, int &_z) {
    return CI(_x)&&CI(_y)&&CI(_z) ;
}
inline bool CI(int &_x, int &_y, int &_z, int &_zz) {
    return CI(_x)&&CI(_y)&&CI(_z)&&CI(_zz) ;
}
struct POINT {
    int x;
    int y;
    POINT(int x=0,int y=0):
            x(x),y(y) {
        ;
    }
};
inline bool Colinear(POINT a, POINT b, POINT c) {
    return (a.x*(b.y-c.y))+(b.x*(c.y-a.y))+(c.x*(a.y-b.y))==0 ;
}
POINT points[16];
int N;
inline void Read() {
    CI(N);
    fo(i,N) {
        CI(points[i].x,points[i].y);
    }
}
vector<int>G[16];
int dp[(1<<16)];
inline void build() {
    fo(i,16)G[i].clear();
    int msk;
    SET(dp,-1);
    fo(i,N) {
        fo(j,N) {
            if (i!=j) {
                msk=(1<<i)|(1<<j);
                fo(k,N) {
                    if (k!=i&&k!=j && Colinear(points[i],points[j],points[k])) {
                        msk|=(1<<k);
                    }
                }
                G[i].pb(msk);
                dp[msk]=1;
            }
        }
    }
}
inline int bc(int msk) {
    return __builtin_popcount(msk);
}
inline int lowbit(int msk) {
    fo(i,16) {
        if (marked(msk,i))return i;
    }
    return 0;
}
const int inf=(int)1023456789;
int go(int msk) {
    int &best=dp[msk];
    if (best!=-1)return best;
    best=inf;
    if (bc(msk)==0)return best=0;
    if (bc(msk)<=2)return best=1;
    int x=lowbit(msk);
    fo(i,SZ(G[x])) {
        int v=1+go(msk&(~G[x][i]));
        best=min(best,v);
    }
    return best;
}
inline void Proc() {
    build();
    cout<<go((1<<N)-1);
    line;
}
int main() {
    int tt;
    CI(tt);
    foE(i,1,tt) {
        Read();
        cout<<"Case "<<i<<": ";
        Proc();
    }
    return 0;
}
